This program is designed to correct inaccuracies in the invisible desktop file which the Finder maintains on each disk. Over time, the desktop file can become cluttered with old information; this slows down the Finder and requires more space on the disk. Fix Desktop can fix three problems with the desktop: extra file comments, extra bundles, and bad application lists.
No major changes in functionality have been made from version 1.1; the main change was a conversion to LightSpeed C. Several minor additions were also made (for instance, inserting a disk while the volume dialog is displayed now switches to that disk). I am also no longer distributing source with the program; if you want a copy, write to me (my address is at the end of the file).
When you add a comment to a file (through the Finder’s Get Info option), the Finder stores the comment in the desktop file. Normally, the comment is removed when the file is deleted by the Finder; however, comments are not removed if the file is deleted by another program. Fix Desktop can remove extra comments from the desktop.
Whenever an application or a document belonging to it is moved onto a disk, information about the application is stored in the desktop file. Over time, a disk which has had many applications or documents on it will accumulate unused “bundles” of this information (such things as the icon used for the application or its documents). Fix Desktop can remove extra bundles from the desktop.
Information allowing the Finder to locate each application on a disk is stored in the desktop file. If applications are deleted by a program other than the Finder, or new applications are added through file transfer, for example, this “application list” may not be updated. Fix Desktop can correct the application list as needed.
Fix Desktop requires the Hierarchical File System (it won’t work on a Mac 128K or unenhanced 512K). No warranty is made as to the safety of using this program on your disks—make a backup of any valuable data first!
This section explains how Fix Desktop works, and is not needed to use the program. You can read it if you want to see how it works…
The basic algorithm used is a simple recursive scan of all files on the disk (which may take a long time if there are lots of files). The Finder information of each file (and folder) found is retrieved and checked against the information found in the Desktop file; inconsistences are fixed.
Extra file comments are removed by first making a list of all FCMT resources in the desktop file. As each file or folder on the disk is scanned, its comment (if any) is removed from the list. When the scan is finished, any remaining FCMT resources are removed. For HFS disks, the comment number is stored with the directory entry; for MFS disks, the filename is hashed to get the comment number.
Extra bundles are removed by first making a list of all BNDL resources in the desktop file. As each file on the disk is scanned, its creator’s bundle (if any) is removed from the list. When the scan is finished, any remaining BNDL resources (with their associated resources) are removed. This ensures that icons for files currently on the disk are not removed, even if the application is not on the same disk.
The application list is actually rebuilt, not just corrected, by Fix Desktop. Each time an application is found, it is added to the new application list. When the scan is finished, the old application list is replaced by the new list. MFS disks do not have an application list.
Resource types manipulated by Fix Desktop include FCMT, APPL, BNDL, any resource types referenced by a bundle (usually FREF and ICN#), and the “signature” resources of applications.
I am currently a graduate student (in computer science, of course!). If you have any questions, comments or suggestions about Fix Desktop (or for future programs), write me at:
Anton Rang
215 S. Green Ave.
New Richmond, WI 54017
You can also reach me via E-mail at “rang@cpswh.cps.msu.edu” (through May 1989).